package com.demo.controller;

import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresAuthentication;
import org.apache.shiro.authz.annotation.RequiresGuest;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @ClassName ToController
 * @Description TODO
 * @Author Windy
 * @Date 2022/9/17 14:24
 * @Version 1.0
 **/
@Controller
@RequestMapping("to")
public class ToController {
    @RequestMapping("unPermission")
    @ResponseBody
    @ApiOperation(value = "unPermission",notes = "无权限提示")
    public String unPermission() {
        return "您没有权限";
    }

    @RequestMapping("toLogin")
    @ApiOperation(value = "toLogin",notes = "登陆页面跳转")
    public String toLogin(){
        return "login";
    }

    @RequestMapping("toRegister")
    public String toRegister() {
        return "register";
    }
    @RequestMapping("toFindAll")
//    @RequiresAuthentication
    public String toFindAll(){
        return "findAll";
    }

    @RequestMapping("toEditStu")
//    @RequiresPermissions(value = {"edit"})
    public String toEditStu(){
        return "edit";
    }

    @RequestMapping("toAddStu")
    public String toAddStu(){
        return "add";
    }
}
